﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using S2B_SCL.Dados.INTF;
using S2B_SCL.Dados.DAO;
using S2B_SCL.Dados.BLL;
using S2B_SCL.Dados.OBJ;
using System.Collections;

namespace S2B_SCL
{
    //public partial class _Default : System.Web.UI.Page
    //public partial class catalogoBuscaCursos : System.Web.UI.Page
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
            if (!IsPostBack)
            {
                Curso tempC = new Curso();
                //tempC.Area = ddlArea.SelectedVAlue;
                //ddlArea.selectVlues
                ClassINTF manipula = new ClassDAO();
                ClassBLL executa = new ClassBLL(manipula);
                //GridView1.DataSource = executa.buscaCursos(tempC); //modificar metodo\aqui!
                //GridView1.DataBind();
                


            }
        }                

        protected void Button1_Click(object sender, EventArgs e)
        {
            Curso tempC = new Curso();
            ClassINTF manipula = new ClassDAO();
            ClassBLL executa = new ClassBLL(manipula);
                
            tempC.Area = DropDownList1.SelectedValue;
            tempC.Estado = DropDownList2.SelectedValue;
            tempC.PagoGratis = DropDownList3.SelectedValue;
            GridView1.DataSource = executa.buscaCursos(tempC);
            GridView1.DataBind(); 

        }
    }
}
